<style lang="less">
  .item1{
    height: 42px;
    line-height: 40px;
  }
  .row-left{
    text-align: center;
    // border-right: 1px solid lightgray;
    // background-color: #eeeef7;
  }
  .title-top{
    margin-bottom:10px;
    color: #1C86EE;
    font-size: 1rem;
    border-bottom: 1px solid orangered;
    font-size: 20px;
    color: coral;
  }
  .content{
    background-color:white;
    height: auto;
    border: 1px solid lightgray;
    width: 100%;
    padding: 0px;
  }
  .idCard{
    width: 170px;
    height: 80px;
    background-color: #79e428;
    position: absolute;
    right: 2%;
    top: 13%;
    color: white;
    font-size: 1.5rem;
    line-height: 80px;
    text-align: center;
  }
  .ivu-steps-item {
    display: initial;
    position: relative;
    vertical-align: initial;
  }
  .step-item {
    float: left;
    margin-left: 0px;
  }
  .red-name{
    color: red
  }
  .navi-title {
    height:30px;
    background-color:#f8f8f9;
    line-height:30px;
    padding-left: 15px;
    color: #5CACEE;
    font-size: 0.7rem;
    font-weight: bold;
  }
</style>
<template>
  <div style="background-color:white">
    <div style="">
      <Row class="title-top">
        <Col span="4" style="text-align: left;width:22%">城市低保救助申请登记</Col>
      </Row>
    </div>
    <div style="height:30px;">
      <Steps :current="1" size="small">
        <div @click="nextStep('0')" class="step-item">
          <Step title="家庭信息" content=""></Step>
        </div>
        <div @click="nextStep('1')" class="step-item">
          <Step title="家庭成员" content=""></Step>
        </div>
        <div @click="nextStep('2')" class="step-item">
          <Step title="基础收入" content=""></Step>
        </div>
        <div @click="nextStep('3')" class="step-item">
          <Step title="基础支出" content=""></Step>
        </div>
        <div @click="nextStep('4')" class="step-item">
          <Step title="赡抚扶养" content=""></Step>
        </div>
        <div @click="nextStep('5')" class="step-item">
          <Step title="基础财产" content=""></Step>
        </div>
        <div @click="nextStep('6')" class="step-item">
          <Step title="财产房产" content=""></Step>
        </div>
        <div @click="nextStep('7')" class="step-item">
          <Step title="工作单位" content=""></Step>
        </div>
        <div @click="nextStep('8')" class="step-item">
          <Step title="教育情况" content=""></Step>
        </div>
        <div @click="nextStep('9')" class="step-item">
          <Step title="家庭附件" content=""></Step>
        </div>
        <div @click="nextStep('10')" class="step-item">
          <Step title="提交信息" content=""></Step>
        </div>
      </Steps>
    </div>
    <div class="content">
      <div class="navi-title">
        家庭成员信息
      </div>
      <div style="height:30px;margin-top:3px" ref="paramData" :rules="ruleValidate">
        <Button type="info" class="step-item" style="margin-left:5px" size="small" @click="entry()">录入</Button>
        <Button type="primary" class="step-item" style="margin-left:5px" size="small" v-if="itemid == '11210101000000MZJD5212000351000'" @click="exchange()">变更业务申请人（家庭户主）</Button>
        <Modal v-model="modal" title="编辑家庭成员" width="1100" cancel-text="关闭"
          style="position:relative;">
          <Row class="item1">
            <Col span="4" style="text-align: center" class="red-name">姓名:</Col>
            <Col span="4">
              <Input v-model="paramData.azcp0003" placeholder=""></Input>
            </Col>
            <Col span="4" style="text-align: center" class="red-name">与申请人关系:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0517">
                <Option :value="obj.key" v-for="obj in data2.FamilyRelationshipDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
          </Row>
          <Row class="item1">
            <Col span="4" style="text-align: center" class="red-name">证件类型:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0002">
                <Option :value="obj.key" v-for="obj in data2.CertificateTypeDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
            <Col span="4" style="text-align: center" class="red-name">证件号码:</Col>
            <Col span="4">
              <Input v-model="paramData.azcp0001" placeholder=""></Input>
            </Col>
          </Row>
          <Row class="item1">
            <Col span="4" style="text-align: center" class="">国籍:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0006">
                <Option :value="obj.key" v-for="obj in data2.NationalityDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
            <Col span="4" style="text-align: center" class="red-name">户籍类别:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0013">
                <Option :value="obj.key" v-for="obj in data2.RegisterTypeDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
          </Row>
          <Row class="item1">
            <Col span="4" style="text-align: center" class="">民族:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0007">
                <Option :value="obj.key" v-for="obj in data2.nationDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
            <Col span="4" style="text-align: center" class="">文化程度:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0008">
                <Option :value="obj.key" v-for="obj in data2.EducationDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
          </Row>
          <Row class="item1">
            <Col span="4" style="text-align: center" class="">政治面貌:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0012">
                <Option :value="obj.key" v-for="obj in data2.PoliticalOutlookDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
            <Col span="4" style="text-align: center" class="">婚姻状况:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0010">
                <Option :value="obj.key" v-for="obj in data2.MaritalStatusDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
            <Col span="4" style="text-align: center" class="">特定救助对象类型:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0547">
                <Option :value="obj.key" v-for="obj in data2.SpecificReliefDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
          </Row>
          <Row class="item1">
            <Col span="4" style="text-align: center" class="">学业状况:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0539">
                <Option :value="obj.key" v-for="obj in data2.EducationStatusDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
            <Col span="4" style="text-align: center" class="red-name">就业状况:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0540">
                <Option :value="obj.key" v-for="obj in data2.WorkStatusDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
            <Col span="4" style="text-align: center" class="">职业:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0011">
                <Option :value="obj.key" v-for="obj in data2.OccupationTypeDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
          </Row>
          <Row class="item1">
            <Col span="4" style="text-align: center" class="red-name">健康状况:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0009">
                <Option :value="obj.key" v-for="obj in data2.HealthDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
            <Col span="4" style="text-align: center" class="red-name">劳动能力丧失情况:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0502">
                <Option :value="obj.key" v-for="obj in data2.WorkAbility" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
            <Col span="4" style="text-align: center" class="">残疾类别:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0504" :disabled="paramData.azcp0009 == '10' || paramData.azcp0009 == '20' || paramData.azcp0009 == '30' || paramData.azcp0009 == '40'">
                <Option :value="obj.key" v-for="obj in data2.DisabilityTypeDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
          </Row>
          <Row class="item1">
            <Col span="4" style="text-align: center" class="">残疾等级:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0505" :disabled="paramData.azcp0009 == '10' || paramData.azcp0009 == '20' || paramData.azcp0009 == '30' || paramData.azcp0009 == '40'">
                <Option :value="obj.key" v-for="obj in data2.DisabilityClassDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
            <Col span="4" style="text-align: center" class="">残疾等级评定时间:</Col>
            <Col span="4">
              <DatePicker type="date" v-model="paramData.azcp0506" style="width: 178px" :disabled="paramData.azcp0009 == '10' || paramData.azcp0009 == '20' || paramData.azcp0009 == '30' || paramData.azcp0009 == '40'"></DatePicker>
            </Col>
            <Col span="4" style="text-align: center" class="">是否伤残:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0507">
                <Option :value="obj.key" v-for="obj in data2.YesOrNoDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
          </Row>
          <Row class="item1">
            <Col span="4" style="text-align: center" class="">伤残等级:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0508" :disabled="paramData.azcp0507 == '0'">
                <Option :value="obj.key" v-for="obj in data2.InvalidismClassDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
            <Col span="4" style="text-align: center" class="">生活自理能力:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0513">
                <Option :value="obj.key" v-for="obj in data2.SelfcareAbilityDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
            <Col span="4" style="text-align: center" class="">护理类型:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0546" :disabled="paramData.azcp0009 != '40'">
                <Option :value="obj.key" v-for="obj in data2.NurseTypeDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
          </Row>
          <Row class="item1">
            <Col span="4" style="text-align: center" class="">伤残等级评定时间:</Col>
            <Col span="4">
              <DatePicker type="date" v-model="paramData.azcp0509" style="width: 178px" :disabled="paramData.azcp0507 == '0'"></DatePicker>
            </Col>
            <Col span="4" style="text-align: center" class="">重病患病时间:</Col>
            <Col span="4">
              <DatePicker type="date" v-model="paramData.azcp0522" style="width: 178px" :disabled="paramData.azcp0009 == '10' || paramData.azcp0009 == '20' || paramData.azcp0009 == '30' || paramData.azcp0009 == '60'"></DatePicker >
            </Col>
            <Col span="4" style="text-align: center" class="">重病病种:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0524" :disabled="paramData.azcp0009 == '10' || paramData.azcp0009 == '20' || paramData.azcp0009 == '30' || paramData.azcp0009 == '60'">
                <Option :value="obj.key" v-for="obj in data2.SicknessTypeDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
          </Row>
          <Row class="item1">
            <Col span="4" style="text-align: center" class="">重病名称:</Col>
            <Col span="4">
              <Input v-model="paramData.azcp0525" placeholder="" :disabled="paramData.azcp0009 == '10' || paramData.azcp0009 == '20' || paramData.azcp0009 == '30' || paramData.azcp0009 == '60'"></Input>
            </Col>
            <Col span="4" style="text-align: center" class="">优抚对象类别:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0520">
                <Option :value="obj.key" v-for="obj in data2.SpecialCareDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
            <Col span="4" style="text-align: center" class="">是否军休干部:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0018">
                <Option :value="obj.key" v-for="obj in data2.YesOrNoDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
          </Row>
          <Row class="item1">
            <Col span="4" style="text-align: center" class="">是否收养对象:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0023">
                <Option :value="obj.key" v-for="obj in data2.YesOrNoDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
            <Col span="4" style="text-align: center" class="">是否流浪乞讨救助人员:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0024">
                <Option :value="obj.key" v-for="obj in data2.YesOrNoDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
            <Col span="4" style="text-align: center" class="">是否福利院入住对象:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0025">
                <Option :value="obj.key" v-for="obj in data2.YesOrNoDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
          </Row>
          <Row class="item1">
            <Col span="4" style="text-align: center" class="">是否复原退伍军人:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0027">
                <Option :value="obj.key" v-for="obj in data2.YesOrNoDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
            <Col span="4" style="text-align: center" class="">现居住地开始居住时间:</Col>
            <Col span="4">
              <DatePicker v-model="paramData.azcp0501" type="date" style="width: 178px"></DatePicker>
              <!-- <DatePicker v-model="paramData.azcp0501" format="yyyy年MM月dd日" type="date" style="width: 178px"></DatePicker> -->
            </Col>
            <Col span="4" style="text-align: center" class="">是否三无人员:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0512">
                <Option :value="obj.key" v-for="obj in data2.YesOrNoDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
          </Row>
          <Row class="item1">
            <Col span="4" style="text-align: center" class="">联系电话:</Col>
            <Col span="4">
              <Input v-model="paramData.azcp0514" placeholder=""></Input>
            </Col>
            <Col span="4" style="text-align: center" class="">养老保险参保类型:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0526">
                <Option :value="obj.key" v-for="obj in data2.PensionTypeDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
            <Col span="4" style="text-align: center" class="">是否参加医疗保险:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0527">
                <Option :value="obj.key" v-for="obj in data2.YesOrNoDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
          </Row>
          <Row class="item1">
            <Col span="4" style="text-align: center" class="">医疗保险参保类型:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0528" :disabled="paramData.azcp0527 == '0'">
                <Option :value="obj.key" v-for="obj in data2.InsuredTypeDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
            <Col span="4" style="text-align: center" class="">是否参加失业保险:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0531">
                <Option :value="obj.key" v-for="obj in data2.YesOrNoDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
            <Col span="4" style="text-align: center" class="">社保编号或新农合编号:</Col>
            <Col span="4">
              <Input v-model="paramData.azcp0529" placeholder=""></Input>
            </Col>
          </Row>
          <Row class="item1">
            <Col span="4" style="text-align: center" class="">社保卡号或新农合卡号:</Col>
            <Col span="4">
              <Input v-model="paramData.azcp0530" placeholder=""></Input>
            </Col>
            <Col span="4" style="text-align: center" class="">所属资源枯竭关破企业名称:</Col>
            <Col span="4">
             <Select v-model="paramData.azcp0541">
                <Option :value="obj.key" v-for="obj in data2.BrokenEnterpriseDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
            <Col span="4" style="text-align: center" class="">是否纳入扶贫建档立卡对象:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0545">
                <Option :value="obj.key" v-for="obj in data2.YesOrNoDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
          </Row>
          <Row class="item1">
            <Col span="4" style="text-align: center" class="">备注说明:</Col>
            <Col span="20">
              <Input v-model="paramData.azcp0543" placeholder=""></Input>
            </Col>
          </Row>
          <img :src="nophoto" alt="..." style="height: 160px; width:120px;position:absolute;right:20%;top:9%;">
          <div slot="footer">
            <Button type="text" size="large" @click="modal = false">取消</Button>
            <Button type="primary" size="large" :disabled="order_state == '1' || order_state == '2' || order_state == '3'" @click="ok111(paramData)">确定</Button>
          </div>
        </Modal>
      </div>
      <div>
        <Table :columns="columns1" :data="data3">
          <template slot-scope="{ row, index, column }" slot="action">
              <Button type="info" size="small" :disabled="order_state == '1' || order_state == '2' || order_state == '3'" @click="edit(index)" style="margin-right:5px">编辑</Button>
              <Button type="error" size="small" :disabled="order_state == '1' || order_state == '2' || order_state == '3'"  @click="deletePeople(index)">删除</Button>
          </template>
        </Table>
        <div style="margin: 10px;overflow: hidden">
        <div style="float: right;">
            <Page :total="data3.length" :current="1" @on-change="changePage"></Page>
        </div>
    </div>
      </div>
    </div>
    <div style="height:40px;line-height:40px;float:left;margin-top:10px;margin-left:40%">
      <Button type="info" :disabled="order_state == '1' || order_state == '2' || order_state == '3'" @click="next()" style="margin-right:5px">下一步></Button>
      <Button type="info" @click="nextPage()" v-if="order_state == '1' || order_state == '2' || order_state == '3'">下一页></Button>
    </div>
  </div>
</template>
<script>
import { getAppraising, createPostNew, findFamilyList, date2str } from '@/api/eventlist'
import nophoto from '@/assets/images/nophoto.jpeg'
export default {
  name: 'subsistenceapplication1',
  data () {
    return {
      next_params: {},
      itemid: this.$route.params.itemid || '',
      family_url: '',
      info_url: '',
      add_url: '',
      update_url: '',
      delete_url: '',
      see: this.$route.params.see || false,
      code: this.$route.params.code,
      url: 'dbsq/addPersonInfo',
      str: this.$route.params.serialNumber,
      idcardNumber: this.$route.params.idcardNumber,
      ss11001Id: this.$route.params.ss11001Id,
      ss11002Id: this.$route.params.ss11002Id,
      ss17001Id: this.$route.params.ss17001Id || '',
      ss17002Id: this.$route.params.ss17002Id || '',
      errorTitle: '保存错误',
      currentid: 0, // 默认不选中
      personId: '', // 家庭成员id
      columns1: [
        {
          title: '姓名',
          key: 'azcp0003',
          render: (h, params) => {
            if (this.itemid === '11210101000000MZJD5212000351000') {
              let id = params.row.id
              if (this.currentid === id) {
                params.row.value = true
              } else {
                params.row.value = false
              }
              let defaultS = params.row.value
              let self = this
              return h('Radio', {
                props: {
                  value: defaultS // 判断单选框状态
                },
                style: {
                  marginRight: '5px'
                },
                on: {
                  'on-change': () => {
                    self.currentid = id // 赋值单选框id。对比id判断状态
                    self.personId = self.currentid
                  }
                }
              }, params.row.azcp0003)
            } else {
              return h('Span', {
                props: {
                },
                style: {
                  marginRight: '5px'
                },
                on: {
                  click: () => {
                  }
                }
              }, params.row.azcp0003)
            }
          }
        },
        {
          title: '与申请人关系',
          key: 'azcp0517',
          width: '120px'
        },
        {
          title: '性别',
          key: 'azcp0004',
          width: '70px'
        },
        {
          title: '证件类型',
          key: 'azcp0002'
        },
        {
          title: '证件号码',
          key: 'azcp0001'
        },
        {
          title: '民族',
          key: 'azcp0007',
          width: '70px'
        },
        {
          title: '健康状况',
          key: 'azcp0009'
        },
        {
          title: '劳动能力丧失情况',
          key: 'azcp0502',
          width: '140px'
        },
        {
          title: '操作',
          slot: 'action'
        }
      ],
      temp: {
        hjcity: '',
        hjarea: ''
      },
      paramData: {
        ss11001Id: this.$route.params.ss11001Id,
        ss11002Id: this.$route.params.ss11002Id,
        ss17001Id: this.$route.params.ss17001Id || '',
        ss17002Id: this.$route.params.ss17002Id || '',
        azcp0507: '',
        azcp0502: '',
        azcp0543: '',
        azcp0027: '',
        azcp0024: '',
        azcp0541: '',
        azcp0025: '',
        azcp0547: '',
        azcp0545: '',
        azcp0023: '',
        azcp0540: '',
        azcp0539: '',
        azcp0013: '',
        azcp0530: '',
        azcp0531: '',
        azcp0018: '',
        azcp0011: '',
        azcp0012: '',
        azcp0010: '',
        azcp0529: '',
        azcp0527: '0',
        azcp0002: '',
        azcp0003: '',
        azcp0520: '',
        azcp0008: '',
        azcp0525: '',
        azcp0009: '',
        azcp0526: '',
        azcp0006: '',
        azcp0007: '',
        azcp0524: '',
        azcp0001: '',
        azcp0517: '',
        azcp0514: '',
        azcp0512: '',
        azcp0513: '',
        azcp0020: '',
        azcp0510: '',
        azcp0518: '',
        azcp0519: '',
        azcp0523: '',
        azcp0508: ''
      },
      ruleValidate: {
        azcp0003: [
          { required: true, message: 'The name cannot be empty', trigger: 'blur' }
        ]
      },
      data1: [],
      data2: [],
      data3: [],
      formitem1: {
        input: '',
        input1: '',
        input2: '',
        input3: '',
        input4: '',
        select: '',
        radio: 'male',
        checkbox: [],
        switch: true,
        date: '',
        time: '',
        slider: [20, 50],
        textarea: ''
      },
      formLeft: {
        input1: ''
      },
      modal: false,
      nophoto,
      order_state: this.$route.params.order_state
    }
  },
  methods: {
    nextStep (step) {
      var params = {}
      if (this.itemid === '11210101000000MZJD5212000330000') {
        params = {
          serialNumber: this.$route.params.serialNumber,
          idcardNumber: this.$route.params.idcardNumber,
          ss11001Id: this.$route.params.ss11001Id,
          ss11002Id: this.$route.params.ss11002Id,
          code: this.$route.params.code,
          see: this.see,
          itemid: this.itemid,
          order_state: this.order_state
        }
      } else if (this.itemid === '11210101000000MZJD5212000351000') {
        params = {
          serialNumber: this.$route.params.serialNumber,
          idcardNumber: this.$route.params.idcardNumber,
          ss17001Id: this.$route.params.ss17001Id,
          ss17002Id: this.$route.params.ss17002Id,
          code: this.$route.params.code,
          see: this.see,
          itemid: this.itemid,
          order_state: this.order_state
        }
      }
      console.log(params, '传参')
      if (step === '0') {
        this.$router.push({
          name: 'subsistenceapplication',
          params: params
        })
      } else if (step === '2') {
        this.$router.push({
          name: 'subsistenceapplication2',
          params: params
        })
      } else if (step === '3') {
        this.$router.push({
          name: 'expenditurelist',
          params: params
        })
      } else if (step === '4') {
        this.$router.push({
          name: 'supportlist',
          params: params
        })
      } else if (step === '5') {
        this.$router.push({
          name: 'basicproperty',
          params: params
        })
      } else if (step === '6') {
        this.$router.push({
          name: 'houseproperty',
          params: params
        })
      } else if (step === '7') {
        this.$router.push({
          name: 'workunit',
          params: params
        })
      } else if (step === '8') {
        this.$router.push({
          name: 'educationinfo',
          params: params
        })
      } else if (step === '9') {
        this.$router.push({
          name: 'nearfamily',
          params: params
        })
      }
    },
    nextPage () {
      var param = {}
      if (this.itemid === '11210101000000MZJD5212000330000') {
        param = {
          serialNumber: this.$route.params.serialNumber,
          idcardNumber: this.$route.params.idcardNumber,
          ss11001Id: this.$route.params.ss11001Id,
          ss11002Id: this.$route.params.ss11002Id,
          code: this.$route.params.code,
          see: this.see,
          itemid: this.itemid,
          order_state: this.order_state
        }
      } else if (this.itemid === '11210101000000MZJD5212000351000') {
        param = {
          serialNumber: this.$route.params.serialNumber,
          idcardNumber: this.$route.params.idcardNumber,
          ss17001Id: this.$route.params.ss17001Id,
          ss17002Id: this.$route.params.ss17002Id,
          code: this.$route.params.code,
          see: this.see,
          itemid: this.itemid,
          order_state: this.order_state
        }
      }
      this.$router.push({
        name: 'subsistenceapplication2',
        params: param
      })
    },
    getFamilyList () {
      var param1 = {}
      if (this.itemid === '11210101000000MZJD5212000330000') {
        param1 = {
          'ss11001Id': this.$route.params.ss11001Id,
          'size': 10,
          'pageNo': 1,
          'serialNumber': this.str,
          'idcardNumber': this.idcardNumber,
          'url': this.family_url
        }
      } else if (this.itemid === '11210101000000MZJD5212000351000') {
        param1 = {
          'ss17001Id': this.$route.params.ss17001Id,
          'size': 10,
          'pageNo': 1,
          'serialNumber': this.str,
          'idcardNumber': this.idcardNumber,
          'url': this.family_url
        }
      }
      findFamilyList(param1).then(res => {
        if (res.data.errcode === 0 && res.data.data.rescode === '0000') {
          this.$Message.success(res.data.data.memo)
          this.data3 = res.data.data.data.personInfo
          for (var i = 0; i < this.data3.length; i++) {
            this.data3[i]['value'] = false
          }
          console.log(this.data3, '人员列表')
          return
        }
        const content = '<p>' + res.data.data.memo + '</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
      })
    },
    getInfo () {
      var param = {
        'idcardNumber': this.idcardNumber,
        'dictsCode': 'ss11002',
        'serialNumber': this.str
      }
      getAppraising(param).then(res => {
        this.data2 = res.data.data.data
        console.log(res, '调用接口返回来的数据')
        console.log(this.data2)
      })
    },
    ok111 (item1) {
      // this.paramData.ss17001Id = this.$route.params.ss17001Id
      // this.paramData.ss11002Id = this.$route.params.ss11002Id
      this.paramData.azcp0522 = date2str(this.paramData.azcp0522)
      this.paramData.azcp0501 = date2str(this.paramData.azcp0501)
      this.paramData.azcp0519 = ''
      var param = {
        'request_map': this.paramData,
        'headers_map': {
          'serialNumber': this.str,
          'idcardNumber': this.idcardNumber
        },
        'url': this.url,
        'code': this.$route.params.code,
        'request_step': '2'
      }
      console.log(param, '入参')
      if (this.paramData.azcp0003 === '' || this.paramData.azcp0003 === undefined) {
        const content = '<p>请输入姓名</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
        return
      }
      if (this.paramData.azcp0517 === '' || this.paramData.azcp0517 === undefined) {
        const content = '<p>请选择与申请人关系</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
        return
      }
      if (this.paramData.azcp0002 === '' || this.paramData.azcp0002 === undefined) {
        const content = '<p>请选择证件类型</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
        return
      }
      if (this.paramData.azcp0001 === '' || this.paramData.azcp0001 === undefined) {
        const content = '<p>请填写证件号码</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
        return
      }
      if (this.paramData.azcp0013 === '' || this.paramData.azcp0013 === undefined) {
        const content = '<p>请选择户籍类别</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
        return
      }
      if (this.paramData.azcp0540 === '' || this.paramData.azcp0540 === undefined) {
        const content = '<p>请选择就业状况</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
        return
      }
      if (this.paramData.azcp0009 === '' || this.paramData.azcp0009 === undefined) {
        const content = '<p>请选择健康状况</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
        return
      }
      if (this.paramData.azcp0502 === '' || this.paramData.azcp0502 === undefined) {
        const content = '<p>请选择劳动能力丧失情况</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
        return
      }
      createPostNew(param).then(res => {
        console.log(res, '调用接口返回来的数据')
        if (res.data.errcode === 0 && res.data.data.rescode === '0000') {
          this.$Message.success(res.data.data.memo)
          this.getFamilyList()
          this.modal = false
        } else {
          const content = '<p>' + res.data.data.memo + '</p>'
          this.$Modal.error({
            title: this.errorTitle,
            content: content
          })
        }
      })
    },
    edit (item1) {
      var obj = this.data3[item1]
      var obj1 = {}
      var str = obj.id
      if (this.itemid === '11210101000000MZJD5212000330000') {
        obj1 = {
          'ss11002Id': obj.id
        }
      } else if (this.itemid === '11210101000000MZJD5212000351000') {
        obj1 = {
          'ss17002Id': obj.id
        }
      }
      this.modal = true
      var param = {
        'request_map': obj1,
        'headers_map': {
          'serialNumber': this.str,
          'idcardNumber': this.idcardNumber
        },
        'url': this.info_url
      }
      createPostNew(param).then(res => {
        var a = res.data.data.data
        for (var obj in a) {
          if (a[obj]) {
            this.paramData[obj] = a[obj]
          } else {
            this.paramData[obj] = this.paramData[obj]
          }
        }
        // this.paramData = res.data.data.data
        delete this.paramData.id
        if (res.data.data.code === '200' || res.data.data.rescode === '1000') {
          if (this.itemid === '11210101000000MZJD5212000330000') {
            this.url = 'dbsq/updatePersonInfo'
            this.paramData.ss11002Id = str
          } else if (this.itemid === '11210101000000MZJD5212000351000') {
            this.url = 'dbbg/updatePersonInfo'
            this.paramData.ss17002Id = str
          }
        } else {
          if (this.itemid === '11210101000000MZJD5212000330000') {
            this.url = 'dbsq/addPersonInfo'
          } else if (this.itemid === '11210101000000MZJD5212000351000') {
            this.url = 'dbbg/addPersonInfo'
          }
        }
        this.$Message.success(res.data.data.memo)
      })
      this.getInfo()
    },
    deletePeople (item1) {
      var obj = this.data3[item1]
      var obj1 = {}
      if (this.itemid === '11210101000000MZJD5212000330000') {
        obj1 = {
          'ss11002Id': obj.id,
          'azcp0001': obj.azcp0001
        }
      } else if (this.itemid === '11210101000000MZJD5212000351000') {
        obj1 = {
          'ss17002Id': obj.id,
          'azcp0001': obj.azcp0001
        }
      }
      // var ss11002Id = obj.id
      var delParam = {
        'request_map': obj1,
        'headers_map': {
          'serialNumber': this.str,
          'idcardNumber': this.idcardNumber
        },
        'url': this.delete_url,
        'request_step': '2',
        'code': this.$route.params.code,
        'operation_state': 'delete'
      }
      console.log(delParam, '入参')
      createPostNew(delParam).then(res => {
        if (res.data.errcode === 0 && res.data.data.rescode === '0000') {
          this.$Message.success(res.data.data.memo)
          this.getFamilyList()
          return
        }
        const content = '<p>' + res.data.data.memo + '</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
      })
    },
    next () {
      console.log('下一步')
      this.$router.push({
        name: 'subsistenceapplication2',
        params: this.next_params
      })
    },
    changePage () {
      // The simulated data is changed directly here, and the actual usage scenario should fetch the data from the server
      this.data3 = this.getFamilyList()
    },
    entry () { // 录入
      this.modal = true
      this.getInfo()
      this.paramData = {
        ss11001Id: this.$route.params.ss11001Id,
        ss11002Id: this.$route.params.ss11002Id,
        ss17001Id: this.$route.params.ss17001Id || '',
        ss17002Id: this.$route.params.ss17002Id || '',
        azcp0507: '',
        azcp0502: '',
        azcp0543: '',
        azcp0027: '',
        azcp0024: '',
        azcp0541: '',
        azcp0025: '',
        azcp0547: '',
        azcp0545: '',
        azcp0023: '',
        azcp0540: '',
        azcp0539: '',
        azcp0013: '',
        azcp0530: '',
        azcp0531: '',
        azcp0018: '',
        azcp0011: '',
        azcp0012: '',
        azcp0010: '',
        azcp0529: '',
        azcp0527: '0',
        azcp0002: '',
        azcp0003: '',
        azcp0520: '',
        azcp0008: '',
        azcp0525: '',
        azcp0009: '',
        azcp0526: '',
        azcp0006: '',
        azcp0007: '',
        azcp0524: '',
        azcp0001: '',
        azcp0517: '',
        azcp0514: '',
        azcp0512: '',
        azcp0513: '',
        azcp0020: '',
        azcp0510: '',
        azcp0518: '',
        azcp0519: '',
        azcp0523: '',
        azcp0508: ''
      }
      if (this.itemid === '11210101000000MZJD5212000330000') {
        this.url = 'dbsq/addPersonInfo'
      } else if (this.itemid === '11210101000000MZJD5212000351000') {
        this.url = 'dbbg/addPersonInfo'
      }
    },
    exchange () { // 变更业务申请人
      if (this.personId === '') {
        const content = '<p>请选择新的主申请人</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
        return
      }
      var param = {
        'request_map': {
          'ss17002Id': this.personId
        },
        'headers_map': {
          'serialNumber': this.str,
          'idcardNumber': this.idcardNumber
        },
        'url': 'dbbg/changeFamilyMaster'
      }
      createPostNew(param).then(res => {
        if (res.data.data.rescode === '0000') {
          this.$Message.success(res.data.data.memo)
          this.getFamilyList()
        } else {
          this.$Message.error(res.data.data.memo)
        }
      })
    }
  },
  mounted () {
    if (this.itemid === '11210101000000MZJD5212000330000') {
      this.url = 'dbsq/addPersonInfo'
      this.family_url = 'dbsq/queryPersonInfo'
      this.info_url = 'dbsq/getPersonInfo'
      this.delete_url = 'dbsq/delPersonInfo'
      this.next_params = {
        serialNumber: this.$route.params.serialNumber,
        idcardNumber: this.$route.params.idcardNumber,
        ss11001Id: this.$route.params.ss11001Id,
        ss11002Id: this.$route.params.ss11002Id,
        code: this.$route.params.code,
        see: this.see,
        itemid: this.itemid,
        order_state: this.order_state
      }
      console.log(this.next_params, '传到后面的json')
    } else if (this.itemid === '11210101000000MZJD5212000351000') {
      this.url = 'dbbg/addPersonInfo'
      this.family_url = 'dbbg/queryPersonInfo'
      this.info_url = 'dbbg/getPersonInfo'
      this.delete_url = 'dbbg/delPersonInfo'
      this.next_params = {
        serialNumber: this.$route.params.serialNumber,
        idcardNumber: this.$route.params.idcardNumber,
        ss17001Id: this.$route.params.ss17001Id,
        ss17002Id: this.$route.params.ss17002Id,
        code: this.$route.params.code,
        see: this.see,
        itemid: this.itemid,
        order_state: this.order_state
      }
    }
    this.getInfo()
    // 列表
    this.getFamilyList()
  }
}
</script>
